/**
  \file dawg_unique_node_set.c
  \author Francis Girard
  \date 01 october 2013

  Dawg unique node set data structure.
*/


/*
 *  Copyright (C) 2013, Francis Girard
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */


#include "dawg_unique_node_set.h"
#include "dawg_rbt.h"

h_dawg_unique_node_set dawg_unique_node_set_create()
{
  return (void*) dawg_rbt_create();
}


void dawg_unique_node_set_destroy(h_dawg_unique_node_set hSet)
{
    h_dawg_rbt hRBT = (h_dawg_rbt) hSet;
    dawg_rbt_destroy(hRBT);
}


void dawg_unique_node_set_add(h_dawg_unique_node_set hSet, void* pNode)
{
    h_dawg_rbt hRBT = (h_dawg_rbt) hSet;
    dawg_rbt_insert(hRBT, pNode);
}


void dawg_unique_node_set_linearize(h_dawg_unique_node_set hSet, h_dawg_arr_node hArr)
{
    h_dawg_rbt hRBT = (h_dawg_rbt) hSet;
    dawg_rbt_linearize(hRBT, hArr);
}


void dawg_unique_node_set_linearize_sorted(h_dawg_unique_node_set hSet, h_dawg_arr_node hArr)
{
    h_dawg_rbt hRBT = (h_dawg_rbt) hSet;
    dawg_rbt_linearize(hRBT, hArr);
}

